package com.elong.businesstravel.protocol.login;

import org.json.JSONException;
import org.json.JSONObject;

import android.content.Context;

import com.elong.businesstravel.protocol.ProtocolDef;
import com.elong.businesstravel.protocol.baserequest.BaseELongHttpRequest;

/**
 * 联合登陆 绑定手机号
 * 
 * @author lenovo
 * 
 */
public class MemberUnionCreateRequest extends BaseELongHttpRequest {

	// $aRule['/app/service/memberunioncreate'] = array(
	// 'version' => array ('type' => 'float'),
	// 'debug' => array ('type' => 'string','mast' => 'N'),
	// 'openid' => array ('type' => 'string'),
	// 'opentype' => array ('type' => 'number'),
	// 'nickname' => array ('type' => 'string','mast' => 'N'),
	// 'mobile' => array ('type' => 'string','mast' => 'N'),
	// 'mobilecode' => array ('type' => 'string','mast' => 'N'),//手机验证码
	// 'recommendnum' => array ('type' => 'string','mast' => 'N'),//邀请码
	// 'deviceid' => array ('type' => 'string','mast' => 'N'),
	// 'token' => array ('type' => 'string','mast' => 'N')
	// );

	public MemberUnionCreateRequest(Context context, String openid,
			String opentype, String nickname, String mobile, String mobilecode,
			String recommendnum) {
		super(context);
		JSONObject jsonObject = new JSONObject();
		try {
			jsonObject.put("openid", openid);
			jsonObject.put("opentype", opentype);
			jsonObject.put("nickname", nickname);
			jsonObject.put("mobile", mobile);
			jsonObject.put("mobilecode", mobilecode);
			jsonObject.put("recommendnum", recommendnum);
		} catch (JSONException e) {
			e.printStackTrace();
		}
		setRequestActionParam(ProtocolDef.ACTION_Memberunioncreate, jsonObject);
	}

}
